From 77221c18a3e41d8ebd0754987359738b5bf6ab5d Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 13 Jul 2012 15:55:44 +0200 Subject: [PATCH] Ensure pixbufs as entry icons get resized Entries don't expand vertically if they are given pixbufs larger than the calculated height for the current font, resulting in cropped icons, so force the pixbuf to be rescaled so it fits on the entry allocated size. https://bugzilla.gnome.org/show_bug.cgi?id=678087 --- gtk/gtkentry.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index db83f058d4..335cb0ffe2 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -2910,6 +2910,7 @@ construct_icon_info (GtkWidget *widget, priv->icons[icon_pos] = icon_info; icon_info->icon_helper = _gtk_icon_helper_new (); + _gtk_icon_helper_set_force_scale_pixbuf (icon_info->icon_helper, TRUE); if (gtk_widget_get_realized (widget)) realize_icon_info (widget, icon_pos); @@ -7620,6 +7621,8 @@ gtk_entry_set_icon_from_pixbuf (GtkEntry *entry, if (pixbuf) { _gtk_icon_helper_set_pixbuf (icon_info->icon_helper, pixbuf); + _gtk_icon_helper_set_icon_size (icon_info->icon_helper, + GTK_ICON_SIZE_MENU); if (icon_pos == GTK_ENTRY_ICON_PRIMARY) { -- 2.30.2